<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class ContractDetail extends Model
{
    use HasFactory;

    protected $fillable = ['user_id','project_id','contract_id','name','content','unit','work_quantity','unit_price','price','remarks'];

    const POSTONLY = ['user_id','project_id','contract_id','name','content','unit','work_quantity','unit_price','price','remarks'];

    protected function serializeDate(\DateTimeInterface $date)
    {
        return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
    }

}
